﻿
var x = "#fEffect/CharacterEff/1112949/0/0#";//高音譜記號
var kk = "#fEffect/BasicEff/MainNotice/Boss/Default/0#";//BOSS
var c = "#fEffect/CharacterEff/1032063/0/0#";//"#fUI/UcminiGame/starPlanetRPS/heart#";//愛心
var cmark = "#fUI/UIPVP/ChampionMark/1#";//愛心
var lb = "#fEffect/CharacterEff/1003393/0/0#";//藍色小光
var b = "#fEffect/CharacterEff/Shaman/1#";//超萌熊熊
var cat = "#fEffect/CharacterEff/Shaman/4#";//超萌喵咪
var tt = "#fUI/Gateway.cmg/WorldSelect/icon/1#";//香菇
var status;


var menuList = Array(
        Array(lb, "50萬抵用券", 0, true),
		Array(lb, "50萬點券  ", 1, true),
		Array(lb, "50萬贊助點", 2, true),
		Array(lb, "經驗罐    ", 3, true),//2432392
		Array(lb, "經驗雙倍卷", 4, true),//2450043
		Array(lb, "楓幣10億  ", 5, true),
		Array(lb, "BOSS 硬 幣", 6, true),
		Array(lb, "BOSS幣商店", 7, true),
		Array(lb, "項鍊飾品等", 8, true),
		Array(lb, "卷軸與潛能", 9, true),
		Array(lb, "技能點滿", 10, true),
		Array(lb, "全能力全滿(盡量不要用)", 11, true),
		Array(lb, "NPC對話測試", 12, true),
		Array(lb, "領取贊助測試", 16, true),
		Array(lb, "新手技能滿", 13, true),
		Array(lb, "超技能滿", 14, true),
		Array(lb, "清空技能", 15, true),
		Array(lb, "NPC測試", 17, true)
		);
function start() {
    status = -1;
    action(1, 0, 0);
}

function action(mode, type, selection) {

    if (mode == 0) {
	cm.dispose();
	return;
    } else if (mode == 1){
	status++;
    } else {
	status--;
    }

    switch (status) {
        case 0: 
			text = c+c+"#fn华文行楷##fs30##e#k #b冰#r火#g谷 " +c+c + "\r\n";
			text += "#fs12##fn宋体#\r\n";
			
			var ccc = 0;
			for (var i = 0; i < menuList.length; i++) {
				if (menuList[i][3]) { 
					text += "#b#L" + menuList[i][2] + "#" + menuList[i][0] + menuList[i][1] + "#l";
					ccc++;
				}
				if(ccc%2 == 0 && ccc != 0)
					text +="\r\n";
			}
			text += "\r\n#fs20##r#L1000#"+ x + "進入商城#l  #L1001#" + x + "贊助我們#l";
			text += "\r\n\r\n" +c+c+c+c+c+c+c;
			cm.sendSimple(text);
            break;
        case 1: //Gift(im.getJob());
			switch (selection){
				case 0:
					cm.gainNX(2, 500000);
					cm.dispose();
					break;
				case 1:
					cm.gainNX(1, 500000);
					cm.dispose();
					break;
				case 2:
					cm.setRMB(cm.getRMB()+500000);
					cm.dispose();
					break;
				case 3:
					cm.gainItem(2432392,100)
					cm.dispose();
					break;
				case 4:
					cm.gainItem(2450043,100)
					cm.dispose();
					break;
				case 5:
					cm.gainMeso(1000000000);
					cm.dispose();
					break;
				case 6:
					cm.gainItem(4310143,10000);
					cm.dispose();
					break;
				case 7:
					cm.dispose();
					cm.openShop(68);
					break;
				case 8:
					cm.gainItem(1122017,1);
					cm.gainItem(1032223,1);
					cm.gainItem(1122267,1);
					cm.gainItem(1132246,1);
					cm.gainItem(1012174,1);
					cm.gainItem(1032219,1);
					cm.gainItem(1032217,1);
					cm.gainItem(1152156,1);
					cm.gainItem(1162018,1);
					cm.gainItem(1113075,1);
					cm.gainItem(1112951,1);
					cm.gainItem(1112952,1);
					cm.dispose();
					break;
				case 9:
					cm.gainItem(2049406,100);
					cm.gainItem(2048307,100);
					cm.gainItem(2048304,100);
					cm.gainItem(2049500,100);
					cm.gainItem(2049704,100);
					cm.gainItem(2048717,100);
					cm.gainItem(2049153,100);
					cm.gainItem(2049349,100);
					cm.gainItem(2046907,100);
					cm.gainItem(2046908,100);
					cm.gainItem(2046909,100);
					cm.gainItem(2046910,100);
					cm.gainItem(4001832,10000);
					cm.dispose();
					break;
				case 10:
					cm.maxSkillsByJob();
					cm.dispose();
					break;
				case 11:
					cm.maxStats();
					cm.dispose();
					break;
				case 12:
					cm.sendPrevN("單純測試專用", 0x24,9400031);
					cm.dispose();
					break;
				case 16:
					cm.dispose();
					cm.openNpc(1052253,"getDonate");
					break;
				case 13:
					cm.maxBeginnerSkills();
					cm.dispose();
					break;
				case 14:
					cm.maxHyperSkillsByJob();
					cm.dispose();
					break;
				case 15:
					cm.clearSkills();
					cm.dispose();
					break;
				case 17:
					cm.dispose();
					cm.openNpc(2008, "移動");
					break;
				case 1000://進入商城
					cm.dispose();
					cm.enterCS();
					break;
				case 1001://贊助網址
					cm.openWeb("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2EW5MJDZXA8F2");
					cm.dispose();
					break;
				default:
					cm.sendOk(menuList[selection][2] + " 正在籌備中!敬請期待。");
					cm.dispose();
					break;
			}
            break;
        default:
			cm.sendOk("發生錯誤，請聯繫管理員!");
			cm.dispose();
			break;
    }
}

function Gift(job) {
    switch (job) {
        case 100: //战士        
            cm.gainItem(1302135, 1); //挑战之单手剑 - 10级
            cm.gainItem(1312049, 1) //挑战之单手斧 - 10级
            cm.gainItem(1322077, 1); //挑战之单手钝器 - 10级
            break;
        case 1100: //魂骑士
        case 5100: //米哈尔
            cm.gainItem(1302135, 1); //挑战之单手剑 - 10级 
            break;
        case 5110:
        case 110:
        case 1110:
        case 6110:
            cm.gainItem(1402081, 1); //挑战之双手剑 - 25级 (无描述)
            break;
        case 1111:
        case 5111:
        case 111:
        case 6111:
            cm.gainItem(1402084, 1); //挑战之双手剑 - 70级 (无描述)
            break;
        case 112:
        case 5112:
        case 1112:
        case 6112:
            cm.gainItem(1402075, 1);
            break;
        case 120:
            cm.gainItem(1402081, 1);
            cm.gainItem(1412051, 1);
            break;
        case 121:
            cm.gainItem(1402084, 1);
            cm.gainItem(1412054, 1);
            break;
        case 122:
            cm.gainItem(1422058, 1);
            break;
        case 130:
            cm.gainItem(1432071, 1);
            cm.gainItem(1442099, 1);
            break;
        case 131:
            cm.gainItem(1432074, 1);
            break;
        case 132:
            cm.gainItem(1432076, 1);
            break;
        case 1200:
        case 200:
        case 2200:
            cm.gainItem(1372043, 1);
            break;
        case 1210:
        case 210:
        case 220:
        case 230:
        case 2211:
            cm.gainItem(1382017, 1);
            break;
        case 1211:
        case 211:
        case 221:
        case 231:
        case 2214:
            cm.gainItem(1372069, 1);
            break;
        case 1212:
        case 212:
        case 222:
        case 232:
        case 2217:
            cm.gainItem(1382094, 1);
            break;
        case 1300:
        case 3300:
        case 300:
            cm.gainItem(1452093, 1);
            cm.gainItem(1462078, 1);
            cm.gainItem(2060000, 1000); //弓矢
            cm.gainItem(2061000, 1000); //弩矢
            break;
        case 1310:
        case 310:
            cm.gainItem(1452096, 1);
            break;
        case 1311:
        case 311:
            cm.gainItem(1452023, 1);
            break;
        case 1312:
        case 312:
            cm.gainItem(1452101, 1);
            break;
        case 3310:
        case 320:
            cm.gainItem(1462000, 1);
            break;
        case 3311:
        case 321:
            cm.gainItem(1462008, 1);
            break;
        case 3312:
        case 322:
            cm.gainItem(1462015, 1);
            break;
        case 1400:
        case 400:
            cm.gainItem(1332063, 1); //短刀
            cm.gainItem(1472061, 1); //拳套
            break;
        case 1410:
        case 410:
            cm.gainItem(1472008, 1);
            break;
        case 1411:
        case 411:
            cm.gainItem(1472037, 1);
            break;
        case 1412:
        case 412:
            cm.gainItem(1472053, 1);
            break;
        case 420:
            cm.gainItem(1332012, 1);
            break;
        case 421:
            cm.gainItem(1332036, 1);
            break;
        case 422:
            cm.gainItem(1332052, 1);
            break;
        case 430: //20
            cm.gainItem(1342000, 1);
            cm.gainItem(1332008, 1)
            break;
        case 431: //30
            cm.gainItem(1342001, 1);
            cm.gainItem(1332009, 1);
            break;
        case 432: //45
            cm.gainItem(1342002, 1);
            cm.gainItem(1332014, 1)
            break;
        case 433: //60
            cm.gainItem(1342004, 1);
            cm.gainItem(1332015, 1);
            break;
        case 434: //100
            cm.gainItem(1342008, 1);
            cm.gainItem(1332052, 1);
            break;
        case 1500:
            cm.gainItem(1482066, 1)
            break;
        case 500:
            cm.gainItem(1492066, 1);
            cm.gainItem(1482066, 1);
            cm.gainItem(2330000, 1000); //银子弹
            break;
        case 3500:
            cm.gainItem(1492066, 1);
            break;
        case 1510:
        case 510:
            cm.gainItem(1492069, 1);
            break;
        case 1511:
        case 511:
            cm.gainItem(1492072, 1);
            break;
        case 1512:
        case 512:
            cm.gainItem(1492074, 1);
            break;
        case 3510:
            cm.gainItem(1492069, 1);
            break;
        case 520:
            cm.gainItem(1492069, 1);
            break;
        case 3511:
            cm.gainItem(1492072, 1);
            break;
        case 521:
            cm.gainItem(1492072, 1);
            break;
        case 3512:
            cm.gainItem(1492074, 1);
            break;
        case 522:
            cm.gainItem(1492074, 1)
            break; //冒险家、骑士团 机械师 豹弩游侠 部分完成
        case 508: //龙的传人
            cm.gainItem(1492066, 1);
            cm.gainItem(2330003, 1000); //银子弹
            break;
        case 570:
            cm.gainItem(1492069, 1);
            break;
        case 571:
            cm.gainItem(1492072, 1);
            break;
        case 572: //龙的传人结束
            cm.gainItem(1492074, 1)
            break;
        case 2100:
            cm.gainItem(1442096, 1);
            break;
        case 2110:
            cm.gainItem(1442099, 1);
            break;
        case 2111:
            cm.gainItem(1442102, 1);
            break;
        case 2112:
            cm.gainItem(1442105, 1);
            break; //战神部分完成
        case 2300:
            cm.gainItem(1522000, 1);
            cm.gainItem(1352000, 1);
            break;
        case 2310:
            cm.gainItem(1522004, 1);
            cm.gainItem(1352001, 1);
            break;
        case 2311:
            cm.gainItem(1522008, 1);
            cm.gainItem(1352002, 1);
            break;
        case 2312:
            cm.gainItem(1522012, 1);
            cm.gainItem(1352003, 1);
            break; //双弩部分完成
        case 2400:
            cm.gainItem(1362000, 1);
            cm.gainItem(1352100, 1);
            break;
        case 2410:
            cm.gainItem(1362005, 1);
            cm.gainItem(1352101, 1);
            break;
        case 2411:
            cm.gainItem(1362009, 1);
            cm.gainItem(1352102, 1);
            break;
        case 2412:
            cm.gainItem(1362013, 1);
            cm.gainItem(1352103, 1);
            break; //幻影部分完成
        case 2700:
            cm.gainItem(1212001, 1);
            break;
        case 2710:
            cm.gainItem(1212002, 1);
            break;
        case 2711:
            cm.gainItem(1212004, 1);
            break;
        case 2712:
            cm.gainItem(1212007, 1);
            break; //TODO 夜光部分 自动穿戴宝珠
        case 3100: //恶魔猎手
            cm.gainItem(1322122, 1);
            break;
        case 3110:
            cm.gainItem(1322124, 1);
            break;
        case 3111:
            cm.gainItem(1322126, 1);
            break;
        case 3112:
            cm.gainItem(1322127, 1);
            break;
        case 3200: //唤灵法师
            cm.gainItem(1382085, 1);
            break;
        case 3210:
            cm.gainItem(1382088, 1);
            break;
        case 3211:
            cm.gainItem(1382091, 1);
            break;
        case 3212:
            cm.gainItem(1382094, 1);
            break;
        case 3600: //尖兵
            cm.gainItem(1242001, 1);
            break;
        case 3610:
            cm.gainItem(1242002, 1);
            break;
        case 3611:
            cm.gainItem(1242004, 1);
            break;
        case 3612:
            cm.gainItem(1242008, 1);
            break; //尖兵结束

        case 3700://10
            cm.gainItem(1582000, 1);
            cm.gainItem(1353400, 1);
            break;
        case 3710://30
            cm.gainItem(1582001, 1);
            cm.gainItem(1353401, 1);
            break;
        case 3711:// 50
            cm.gainItem(1582002, 1);
            cm.gainItem(1582003, 1);
            cm.gainItem(1353402, 1);
            break;
        case 3712://
            cm.gainItem(1582006, 1);
            cm.gainItem(1353403, 1);
            break;

        case 6100: //狂龙战士
            cm.gainItem(1402177, 1);
            break;
        case 6500:
            cm.gainItem(1222001, 1);
            break;
        case 6510:
            cm.gainItem(1222002, 1);
            break;
        case 6511:
            cm.gainItem(1222004, 1);
            break;
        case 6512:
            cm.gainItem(1222008, 1);
            break;
        case 3101:
            cm.gainItem(1232001, 1);
            break;
        case 3120:
            cm.gainItem(1232002, 1);
            break;
        case 3121:
            cm.gainItem(1232004, 1);
            break;
        case 3122:
            cm.gainItem(1232008, 1);
            break;
        case 501: //火炮手
            cm.gainItem(1532045, 1);
            break;
        case 530:
            cm.gainItem(1532049, 1);
            break;
        case 531:
            cm.gainItem(1532053, 1);
            break;
        case 532:
            cm.gainItem(1532057, 1);
            break;
        case 2500:
            cm.gainItem(1482066, 1);
            cm.gainItem(1353100, 1);
            break;
        case 2510:
            cm.gainItem(1482069, 1);
            cm.gainItem(1353101, 1);
            break;
        case 2511:
            cm.gainItem(1482072, 1);
            cm.gainItem(1353102, 1);
            break;
        case 2512:
            cm.gainItem(1482074, 1);
            cm.gainItem(1353103, 1);
            break;
        case 4100:
            cm.gainItem(1542000, 1);
            break;
        case 4110:
            cm.gainItem(1542002, 1);
            break;
        case 4111:
            cm.gainItem(1542005, 1);
            break;
        case 4112:
            cm.gainItem(1542009, 1);
            break;
        case 4200:
            cm.gainItem(1552000, 1);
            break;
        case 4210:
            cm.gainItem(1552002, 1);
            break;
        case 4211:
            cm.gainItem(1552005, 1);
            break;
        case 4212:
            cm.gainItem(1552009, 1);
            break;
        case 14200:
            cm.gainItem(1353200, 1);
            break;
        case 14210:
            cm.gainItem(1262001, 1);
            cm.gainItem(1353201, 1);
            break;
        case 14211:
            cm.gainItem(1262003, 1);
            cm.gainItem(1353202, 1);
            break;
        case 14212:
            cm.gainItem(1262007, 1);
            cm.gainItem(1353203, 1);
            break;
    }
}
